<!DOCTYPE html>
<html>
    <head></head>
    <body>
        <script src="./myPromise.js"></script>
        <script>
            console.log("before")
            let p = new myPromise((resolve, reject) => {
                resolve("ok")
            })
            p.then(value => console.log(value))
            console.log("after")
        </script>
    </body>
</html>